package com.yang.studentsapp.ui.adapter;

import android.content.Context;
import android.view.View;


import com.yang.studentsapp.AdapterClickBack;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by LongWH on 2016/9/23.
 * All Rights Reserved by ZhiYou @2016 - 2017
 */
public abstract class CommListenerAdapter<T>
        extends CommonAdapter<T> implements AdapterClickBack {




    public CommListenerAdapter(Context context, List<T> dataList, int layoutId) {
        super(context, dataList, layoutId);

    }

    @Override
    protected ViewHolder getViewHolder(View convertView) {
        return new ViewHolder(this, convertView);
    }

    @Override
    protected void setEvent(ViewHolder holder, View convertView) {
        setListener(holder,convertView);
    }

    /**设置监听事件
     * @param holder ：ViewHolder
     * @param convertView ：
     */
    public abstract void setListener(ViewHolder holder, View convertView);







}
